/*
 * Copyright (c) $today.year-Now http://www.zxpnet.com All rights reserved.
 */

package com.zxp.springboot.jpademo.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.time.LocalDateTime;

/**
 * CREATE TABLE `persistent_logins` (
 *   `username` varchar(64) NOT NULL,
 *   `series` varchar(64) NOT NULL,
 *   `token` varchar(64) NOT NULL,
 *   `last_used` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 *   PRIMARY KEY (`series`)
 * ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 *
 * @author: shollin
 * @date: 2021/7/4/004 10:07
 */
@Table
@Entity
@Data
@JsonIgnoreProperties(value = "hibernateLazyInitializer")
public class PersistentLogins {
    @Id
    private String series;
    private String username;
    private String token;
    private LocalDateTime lastUsed;

}
